package sniff.pack;

public class MyOSPFPacket extends CommonIPChildPacket{
	protected int ospfVersion;
	protected int packType;
	protected int packLen;
	protected long routerID;
	protected long areaID;
	protected String checkSum;
	protected int auType;
	protected String authentication;
	
	public MyOSPFPacket() {
		
	}
	
	public MyOSPFPacket(int ospfVersion, int packType, int packLen, long routerID, long areaID, String checkSum,
			int auType, String authentication) {
		this.ospfVersion = ospfVersion;
		this.packType = packType;
		this.packLen = packLen;
		this.routerID = routerID;
		this.areaID = areaID;
		this.checkSum = checkSum;
		this.auType = auType;
		this.authentication = authentication;
	}
	public int getOspfVersion() {
		return ospfVersion;
	}
	public void setOspfVersion(int ospfVersion) {
		this.ospfVersion = ospfVersion;
	}
	public int getPackType() {
		return packType;
	}
	public void setPackType(int packType) {
		this.packType = packType;
	}
	public int getPackLen() {
		return packLen;
	}
	public void setPackLen(int packLen) {
		this.packLen = packLen;
	}
	public long getRouterID() {
		return routerID;
	}
	public void setRouterID(long routerID) {
		this.routerID = routerID;
	}
	public long getAreaID() {
		return areaID;
	}
	public void setAreaID(long areaID) {
		this.areaID = areaID;
	}
	public String getCheckSum() {
		return checkSum;
	}
	public void setCheckSum(String checkSum) {
		this.checkSum = checkSum;
	}
	public int getAuType() {
		return auType;
	}
	public void setAuType(int auType) {
		this.auType = auType;
	}
	public String getAuthentication() {
		return authentication;
	}
	public void setAuthentication(String authentication) {
		this.authentication = authentication;
	}
	@Override
	public String toString() {
		StringBuffer sb = new StringBuffer();
		sb.append("OSPF Version:"+this.ospfVersion+"\n");
		sb.append("Packet Type:"+this.packType+"\n");
		sb.append("Length:"+this.packLen+"\n");
		sb.append("Router ID:"+this.routerID+"\n");
		sb.append("Area ID:"+this.areaID+"\n");
		sb.append("Check Sum:"+this.checkSum+"\n");
		sb.append("Au Type"+this.auType+"\n");
		sb.append("Authentication"+this.authentication+"\n");
		return sb.toString();
	}
}
